def serialize_search_permission(permission: 'Permission') -> dict:
    return {
        'key': permission.id,
        'name': permission.name,
    }


def serialize_search_user(user: 'User') -> dict:
    return {
        'id': user.id,
        'username': user.username
    }
